import { getDictByType } from "@/api/project/common.js";
export default function useDictFetch(name) {
  let result = ref([]);
  const getList = async (name) => {
    const params = {
      dictType: name,
    };
    try {
      const res = await getDictByType(params);
      result.value = res.rows;
    } catch (error) {
      console.log(error);
    }
  };
  getList(name);
  return result;
}
